#!/usr/bin/python3
 
import pymongo
import datetime
import csv
 
# myclient = pymongo.MongoClient("mongodb://root:123456@192.168.200.109:27017/?replicaSet=rs0&authSource=admin") # 
myclient = pymongo.MongoClient("mongodb://root:!(%2FQqi%2B9ka0y@192.168.200.108:27017/?authSource=admin&replicaSet=rs0") # 
dbs = myclient.database_names()

print(dbs)

mydb = myclient["bms_pre"] # 数据库名
cns = mydb.collection_names()
print(cns)
mycol = mydb["BillingDetail"] # 表名

